<?php
/**
* @author Tibor Pino (tibor.pino@gmail.com)
* @license released under GNU Public License v. 2
* @copyright Copyright (c) 2007, Tibor Pino
*
*/

class AdminMenuHelper extends AppHelper {

    var $helpers = array('Html');

    function write() {
        $content = '<div id="small_menu">';
        $content .= $this->Html->link(__('ARTICLE_NEW',true), array('controller'=>'articles','action'=>'add'));
        $content .= '&nbsp;';
        $content .= $this->Html->link(__('NEWS_NEW',true),array('controller'=>'news','action'=>'add'));
        $content .= '</div>';
        return $this->output($content);
    }

    function manage() {
        $content = '<div id="small_menu">';
        $content .= $this->Html->link(__('MENU_ITEM_NEWS',true),array('controller'=>'news','action'=>'index'));
        $content .= '&nbsp;';
        $content .= $this->Html->link(__('MENU_ITEM_ARTICLES',true),array('controller'=>'articles','action'=>'index'));
        $content .= '&nbsp;';
        $content .= $this->Html->link(__('MENU_ITEM_CATEGORIES',true),array('controller'=>'categories','action'=>'index'));
        $content .= '&nbsp;';
        $content .= $this->Html->link(__('MENU_ITEM_TAGS',true),array('controller'=>'tags','action'=>'index'));
        $content .= '&nbsp;';
        $content .= $this->Html->link(__('MENU_ITEM_COMMENTS',true),array('controller'=>'comments','action'=>'index'));
        $content .= '&nbsp;';
        $content .= $this->Html->link(__('MENU_ITEM_DOWNLOADS',true),array('controller'=>'downloads','action'=>'index'));
        $content .= '</div>';
        return $this->output($content);
    }

    function settings() {
        $content = '<div id="small_menu">';
        $content .= $this->Html->link(__('MENU_ITEM_MAIN_SETTINGS',true),array('controller'=>'settings','action'=>'site'));
        $content .= '&nbsp;';
        $content .= $this->Html->link(__('MENU_ITEM_DESIGN',true),array('controller'=>'themes','action'=>'index'));
        $content .= '&nbsp;';
        $content .= $this->Html->link(__('MENU_ITEM_EDIT_LAYOUT',true),array('controller'=>'themes','action'=>'editlayout','css'));
        $content .= '&nbsp;';
        $content .= $this->Html->link(__('MENU_ITEM_SIDEBOXES',true),array('controller'=>'sideboxes','action'=>'index'));
        $content .= '&nbsp;';
        $content .= $this->Html->link(__('blacklist',true),array('controller'=>'blacklists','action'=>'index'));

        $content .= '</div>';
        return $this->output($content);
    }

    function users() {
        $content = '<div id="small_menu">';
        $content .= $this->Html->link(__('MENU_ITEM_GROUPS',true),array('controller'=>'groups','action'=>'index'));
        $content .= '&nbsp;';
        $content .= $this->Html->link(__('SMALL_MENU_ITEM_USERS',true),array('controller'=>'users','action'=>'index'));
        $content .= '</div>';
        return $this->output($content);
    }

    function bigMenu($active='logo') {
        $content = "<li>".$this->Html->image('fantom-logo.png',array('align'=>'left','hspace'=>5)).$this->Html->link(__('Fantom',true),array('controller'=>'statistics','action'=>'index'),array('class'=>'current'))."</li>";
        $content .= "<li>".$this->Html->link(__('MENU_ITEM_WRITE',true),array('controller'=>'articles','action'=>'add'))."</li>";
        $content .= "<li>".$this->Html->link(__('MENU_ITEM_MANAGE_CONTENT',true),array('controller'=>'articles','action'=>'index'))."</li>";
        $content .= "<li>".$this->Html->link(__('MENU_ITEM_USERS',true),array('controller'=>'users','action'=>'index'))."</li>";
        $content .= "<li>".$this->Html->link(__('MENU_ITEM_SETTINGS',true),array('controller'=>'settings','action'=>'site'))."</li>";
        $content .= "<li>".$this->Html->link(__('MENU_ITEM_LOGOUT',true),array('controller'=>'users','action'=>'logout'))."</li>";
        $content .= "<li>".$this->Html->link(__('MENU_ITEM_YOUR_BLOG',true),'/')."</li>";
        return $this->output($content);
    }
}
?>